// standard.hpp
// Include some standard header files.
//
// Copyright (C) 2008  Maksim Sipos <msipos@mailc.net>
//
// This file is a part of the Ripe language project.
//
// Ripe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

#ifndef R_STANDARD_HPP
#define R_STANDARD_HPP

// Make inttypes.h include PRI* macros (for printf)
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include <cassert>
#include <cstdlib>

// Include standard exceptions
#include "util/exception.hpp"

// Assert that this location is never reachable in code.
#define assert_never() assert(0)

// As always, take care when using these:
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))

#define R_VER_MAJOR 0
#define R_VER_MINOR 1

// Major version 0: pre-release
//   Version 0.1: work prior to VM+assembler release

#endif // R_STANDARD_HPP
